<template>
  <view
      v-if="prop_clone_navbar && prop_clone_navbar.navs && prop_clone_navbar.navs.length > 0"
  >
    <view
        class="navbar flex-row"
        :style="{
                        'background-image': prop_clone_navbar.background_image,
                        'border': '1px solid ' + prop_clone_navbar.border_color,
                        'bottom': prop_is_ipx ? '40rpx' : '0rpx',
                        'z-index': 999
                    }"
    >
      <!--遍历底部导航条目-->
      <block v-for="(item, index) in prop_clone_navbar.navs" :key="index">

        <navigator
            class="flex-grow-1 flex-y-center"
            openType="redirect"
            :url="item.url"
            v-if="item.item == '1' || item.item == null"
        >
          <view>
            <image class="navbar-icon" :src="item.active ? item.logo : item.logo2"></image>
            <view class="navbar-text"
                  :style="{
                                        'color': item.active ? item.title_color : item.title_color2,
                                      }"
            >
              {{ item.title }}
            </view>
          </view>
        </navigator>


        <navigator
            class="flex-grow-1 flex-y-center"
            openType="redirect"
            :url="'/ymq_canyino2o/pages/extra/weburl?url=' + item.src2"
            v-if="item.item == '2'"
        >
          <view>
            <image class="navbar-icon" :src="item.active ? item.logo : item.logo2"></image>
            <view class="navbar-text"
                  :style="{
                                        'color': item.active ? item.title_color : item.title_color2,
                                      }"
            >
              <!--<text>-->
              <!--  22-->
              <!--</text>-->
              {{ item.title }}
            </view>
          </view>
        </navigator>


        <navigator
            :appId="item.appid"
            class="flex-grow-1 flex-y-center"
            extraData=""
            openType="navigate"
            path=""
            target="miniProgram"
            version="release"
            v-if="item.item == '3'"
        >
          <view>
            <image class="navbar-icon" :src="item.active ? item.logo : item.logo2"></image>
            <view class="navbar-text"
                  :style="{
                                        'color': item.active ? item.title_color : item.title_color2,
                                      }"
            >
              {{ item.title }}
            </view>
          </view>
        </navigator>


      </block>


    </view>
    <view class="bgf" v-if="prop_is_ipx"></view>
  </view>

</template>
<script>

export default {
  name: 'daya-clone-navbar',
  props: {
    prop_clone_navbar: {
      type: Object,
      default: () => {
        return {}
      }
    },
    prop_is_ipx: {
      type: Boolean,
      default: false
    }
  },
  methods:{

  }
}
</script>

